/*
* IBM Confidential
* (C) Copyright IBM Corp. 2011 All Rights Reserved.
*/
package com.ibm.crm.tma.adapter.mq.testplan;
import java.util.TimerTask;

import com.ibm.crm.tma.adapter.messagelog.TMAMessageLog;

/**
 * <p>
 * This class is the base class of all timer tasks defined in this component.
 * It extends java.util.TimerTask, defines TMA_MESSAGE_LOG 
 * field which will be used by subclasses for logging and 
 * provides a protected getter for it.
 * </p>
 * <p>
 * Thread Safety :
 * This class is immutable and thus thread safe.
 * </p>
 * @author Schpotsky, TCSDEVELOPER
 * @version 1.0
*/
public abstract class BaseTimerTask extends TimerTask {
    /**
     * <p>
     * The TMAMessageLog instance to be used by subclasses to log 
     * execution information/errors to the common log file. (for 
     * more information about logging, please refer to the section
     * 1.3.1 of the CS).
     * Initialized during the construction and never changed after that.
     * Can not be null.
     * It has a protected getter in order to be accessed by subclasses.
     * It is used by subclasses to log data to common log file.
     * </p>
    */
    private static final TMAMessageLog TMA_MESSAGE_LOG =
            TMAMessageLog.getMessageLogInstance("TMATestProcessMenu");
    /**
     * <p>
     * Default empty protected constructor.
     * </p>
    */
    protected BaseTimerTask() {
    }
    /**
     * <p>
     * Gets the TMA_MESSAGE_LOG instance field.
     * </p>
     * @return The TMA_MESSAGE_LOG.
    */
    protected TMAMessageLog getTMAMessageLog() {
        return TMA_MESSAGE_LOG;
    }
}

